home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / shllutil.lha / shellutils-1.8 / configure.in < prev    next >
Text File  |  1992-10-01  |  2KB  |  95 lines

  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_INIT(src/stty.c)
  3. AC_SUBST(PROGS)dnl
  4. AC_SUBST(MAN)dnl
  5. AC_PROG_CC
  6. AC_PROG_CPP
  7. AC_GCC_TRADITIONAL
  8. AC_PROG_INSTALL
  9. AC_PROG_RANLIB
  10. AC_AIX
  11. AC_MINIX
  12. AC_ISC_POSIX
  13. AC_SCO_INTL
  14. AC_FUNC_CHECK(uname, PROGS="$PROGS uname" MAN="$MAN uname.1" have_uname=1)
  15. AC_HEADER_CHECK(limits.h, AC_DEFINE(HAVE_LIMITS_H))
  16. AC_HEADER_CHECK(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
  17. echo checking for shadow password routines
  18. AC_HEADER_EGREP(sp_pwdp, shadow.h, AC_DEFINE(HAVE_SHADOW_H))
  19. AC_STDC_HEADERS
  20. AC_UNISTD_H
  21. AC_USG
  22. AC_UID_T
  23. AC_SIZE_T
  24. AC_REPLACE_FUNCS(gethostname getusershell mktime stime strcspn strstr strtol strtoul strtod)
  25. AC_HAVE_FUNCS(strerror ftime)
  26.  
  27. AC_COMPILE_CHECK(setpriority,
  28. [#include <sys/time.h>
  29. #include <sys/resource.h>],
  30. [setpriority(0, 0, 0);],
  31. PROGS="$PROGS nice nohup" MAN="$MAN nice.1 nohup.1")
  32. case "$PROGS" in
  33. *nice*) ;;
  34. *)
  35. AC_COMPILE_CHECK(nice, , nice();, 
  36. AC_DEFINE(NICE_PRIORITY) PROGS="$PROGS nice nohup" MAN="$MAN nice.1 nohup.1") ;;
  37. esac
  38.  
  39. case "$LIBOBJS" in
  40. *gethostname*) test -n "$have_uname" && AC_DEFINE(HAVE_UNAME)
  41. ;;
  42. esac
  43.  
  44. AC_COMPILE_CHECK(ut_host in struct utmp,
  45. [#include <sys/types.h>
  46. #include <utmp.h>], [struct utmp ut; ut.ut_host;],
  47. AC_DEFINE(HAVE_UT_HOST))
  48.  
  49. AC_COMPILE_CHECK(POSIX termios,
  50. [#include <sys/types.h>
  51. #include <unistd.h>
  52. #include <termios.h>],
  53. [/* SunOS 4.0.3 has termios.h but not the library calls.  */
  54. tcgetattr(0, 0);], have_termios=1)
  55. if test -n "$have_termios"; then
  56. PROGS="$PROGS stty" MAN="$MAN stty.1"
  57. AC_COMPILE_CHECK(c_line in struct termios,
  58. [#include <sys/types.h>
  59. #include <termios.h>], [struct termios t; t.c_line;], AC_DEFINE(HAVE_C_LINE))
  60.  
  61. AC_HEADER_CHECK([sys/ptem.h], have_ptem=1 AC_DEFINE(WINSIZE_IN_PTEM))
  62. echo checking for broken window size ioctl
  63. echo "#include <sys/types.h>
  64. #include <termios.h>" > conftest.c
  65. test -n "$have_ptem" && echo "#include <sys/ptem.h>" >> conftest.c
  66. echo "main() {
  67. #ifndef TIOCGWINSZ
  68. exit(0);
  69. #else
  70. struct winsize w;
  71. exit(ioctl(0, TIOCGWINSZ, &w));
  72. #endif
  73. }" >> conftest.c
  74. eval $compile
  75. if test -s conftest && ./conftest 2>/dev/null; then :
  76. else AC_DEFINE(GWINSZ_BROKEN)
  77. fi
  78. rm -f conftest conftest.c
  79. fi
  80.  
  81. AC_VPRINTF
  82. AC_ALLOCA
  83. AC_STRUCT_TM
  84. AC_TIMEZONE
  85. AC_XENIX_DIR
  86. echo checking for libinet
  87. # Needed on ISC for syslog.
  88. test -f /usr/lib/libinet.a && LIBS="$LIBS -linet"
  89.  
  90. echo checking for libsec
  91. # Needed on SysV for shadow passwords.
  92. test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec"
  93.  
  94. AC_OUTPUT(Makefile lib/Makefile src/Makefile man/Makefile)
  95.